package Level01_four;

public class Handler {
    private Speaking speaking;

    public void run(){
        // 如果任务不为空，则执行任务
        if(speaking != null){
            speaking.english();
            speaking.chinese();
        }
    }

    public Handler(Speaking speaking) {
        this.speaking = speaking;
    }

    public Handler() {
    }

    public Speaking getSpeaking() {
        return speaking;
    }

    public void setSpeaking(Speaking speaking) {
        this.speaking = speaking;
    }
}
